package com.dubbo.service.impl;import com.dubbo.domain.Order;import com.dubbo.service.OrderService;import com.dubbo.service.ShopService;/** * Created by Administrator on 2020-3-3. */public class ShopServiceImpl implements ShopService {    private OrderService orderService;    //spring 的IOC 设值注入     public void setOrderService(OrderService orderService) {        this.orderService = orderService;    }    @Override    public Order buyGoods(Integer userId, String goodName, float price, int amount) {        //购买商品生成订单，订单生成有服务提供者orderservice Provider 完成的        //需要调用服务提供者的方法createOrder()        System.out.println("代理"+ orderService.getClass().getName());        Order order = orderService.createOrder(userId,goodName,price,amount);        //其他业务逻辑        return order;    }}